<? global $FullUrl, $lg, $articles, $cat1, $cat2, $cat, $plpage; ?>

<div class="list-articles">
  <div class="header-title">
    <h2><span>
      <?= (isset($_GET['cat1']) ? GetNameFromCat($_GET['cat1']) : '') ?>
      </span></h2>
  </div>
  <? if ($articles) { ?>
  <ul class="list-item">
    <? for ($i = 0; $i < count($articles); $i++) {
        $art = $articles[$i];
        $rs = $art['img'];
        $img = GetImage($rs);

        $link = GetProductLink2($art, $lg);
        $w = 164;
        $h = 164;
        $sizes = fixSize($img, $w, $h);
        $sizes_img_true = getimagesize($img);
        //print_r($sizes);

        $url_image = $img;
?>
    <li>
      <h2><a href="<?= $link ?>" title="<?= $art["name_" . $lg] ?>" rel="bookmark">
        <?= $art["name_" . $lg] ?>
        </a></h2>
      <div class="image-list"><a href="<?= $link ?>"> <img src="<?= GetPHPThumb($url_image, 164, 164); ?>" 
        alt="<?= $art["name_" .
$lg] ?>" title="<?= $art["name_" .
$lg] ?>" style="margin-left:<?= ImageCenterHorizontal($sizes['width'],
            164) ?>px" /> </a></div>
      <div class="short-article">
        <div class="view-list"><span><img src="<?= $FullUrl ?>/<?= CST_IMAGES ?>/eye.png" height="15" alt="Lượt xem" />
          <?= number_format($art['view']); ?>
          <!--<img src="<?= $FullUrl ?>/<?= CST_IMAGES ?>/date.png" height="20" alt="Ngày đăng" />
          <?= $art['date_post'] ?>--></span>
        </div>
        <div class="text-list">
          <?= $art["short_" . $lg] ?>
        </div>
        <div class="xem-tiep"><a title="Xem tiếp" href="<?= $link ?>">Xem tiếp</a></div>
      </div>
    </li>
    <? } ?>
  </ul>
  <?= $plpage ?>
  <? } else
    echo '<div style="font-weight:bold; text-align:center; padding:30px; margin:0 auto; ">' .
        NO_NEWS . '</div>';
?>
</div>
<?php Template::UserControlTPL('Banners'); ?>